import { requests } from './request'

export const getLogin = (data) => {
  return requests({
    url: '/user/login',
    method: 'post',
    data: data
  })
}

export const getRegister = (data) => {
  return requests({
    url: '/user/register',
    method: 'post',
    data: data
  })
}


// 职位相关接口
export const getJobList = (data) => {
  return requests({
    url: '/job/list',
    method: 'post',
    data: data
  })
}

export const getJobAdminList = (data) => {
  return requests({
    url: '/job/admin/list',
    method: 'post',
    data: data
  })
}

export const getJobTypeList = (data) => {
  return requests({
    url: '/job/type/list',
    method: 'post',
    data: data
  })
}

export const getJobSubmit = (data) => {
  return requests({
    url: '/job/submit',
    method: 'post',
    data: data
  })
}


export const getUserInfo = () => {
  return requests({
    url: '/user/info',
    method: 'get',
  })
}

export const getUserSubmit = (data) => {
  return requests({
    url: '/user/submit',
    method: 'post',
    data: data
  })
}

export const getUserAdminSubmit = (data) => {
  return requests({
    url: '/user/admin/submit',
    method: 'post',
    data: data
  })
}

export const getUserList = (data) => {
  return requests({
    url: '/user/list',
    method: 'post',
    data: data
  })
}


export const getDeliverList = (data) => {
  return requests({
    url: '/deliver/list',
    method: 'post',
    data: data
  })
}

export const getDeliverAdminList = (data) => {
  return requests({
    url: '/deliver/admin/list',
    method: 'post',
    data: data
  })
}

export const getDeliverSubmit = (data) => {
  return requests({
    url: '/deliver/submit',
    method: 'post',
    data: data
  })
}

export const getResumeSubmit = (data) => {
  return requests({
    url: '/resume/submit',
    method: 'post',
    data: data
  })
}

export const getResumeInfo = () => {
  return requests({
    url: '/resume/info',
    method: 'get',
  })
}


export const getCompanyList = (data) => {
  return requests({
    url: '/company/list',
    method: 'post',
    data: data
  })
}

export const getCompanySubmit = (data) => {
  return requests({
    url: '/company/submit',
    method: 'post',
    data: data
  })
}

export const getEmailSend = (data) => {
  return requests({
    url: '/email/send/' + data,
    method: 'post',
  })
}

export const getNoticeList = (data) => {
  return requests({
    url: '/notice/list',
    method: 'post',
    data: data
  })
}

export const getNoticeAdminList = (data) => {
  return requests({
    url: '/notice/admin/list',
    method: 'post',
    data: data
  })
}


export const getNoticeSubmit = (data) => {
  return requests({
    url: '/notice/submit',
    method: 'post',
    data: data
  })
}

export const getNoticeInfo = (data) => {
  return requests({
    url: '/notice/info/' + data,
    method: 'post',
  })
}

export const delNotice = (data) => {
  return requests({
    url: '/notice/delete/' + data,
    method: 'put',
  })
}

export const delCompany = (data) => {
  return requests({
    url: '/company/delete/' + data,
    method: 'put',
  })
}